package com.helei.data.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.helei.data.entity.SysMenu;
import com.helei.data.mapper.SysMenuMapper;
import com.helei.data.service.SysMenuService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 系统菜单表 服务实现类
 * </p>
 *
 * @author hl
 * @since 2021-07-18
 */
@Service
public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> implements SysMenuService {
    @Override
    public List<SysMenu> selectUserRoleMenu(List<Long> collect) {
        return this.baseMapper.selectUserRoleMenu(new QueryWrapper<>().select("sm.icon","sm.router","sm.component","sm.permission").eq("sm.status",0).in("rm.role_id",collect));
    }
}
